package datastructure.tree.avl2;

/**
 * AVL树的节点对象
 *
 * @author 杨 强
 * @package datastructure.tree.avl2
 * @createTime 2023-03-30 22:42
 */
public class AVLNode {
    /**
     * 节点高度
     */
    int height = 1;
    /**
     * key
     */
    int key;
    /**
     * 节点元素值
     */
    Object value;
    /**
     * 左节点
     */
    AVLNode left;
    /**
     * 右节点
     */
    AVLNode right;

    public AVLNode() {
    }

    public AVLNode(int key, Object value) {
        this.key = key;
        this.value = value;
    }

    public AVLNode(int key, Object value, AVLNode left, AVLNode right) {
        this.key = key;
        this.value = value;
        this.left = left;
        this.right = right;
    }
}
